<?php
/* @var $this MstPerusahaanAsuransiController */
/* @var $model MstPerusahaanAsuransi */


$this->breadcrumbs=array(
	'Mst Perusahaan Asuransis'=>array('index'),
	'Manage',
);



Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#mst-perusahaan-asuransi-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>Perusahaan Asuransi</h1>
<a href="<?php echo Yii::app()->createUrl('mstPerusahaanAsuransi/create'); ?>" class="btn btn-sm btn-primary">Add New</a><br /><br />

<?php echo CHtml::link('Search','#',array('class'=>'search-button btn')); ?>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->

<?php $this->widget('bootstrap.widgets.TbGridView',array(
	'id'=>'mst-perusahaan-asuransi-grid',
	'dataProvider'=>$model->search(),
	//'filter'=>$model,
	'columns'=>array(
		'no_insurance',
		'name',
		'address',
		array(
			'name'=>'province_id',
			'value'=>'MstPropinsi::model()->findByPk($data->province_id)->nm_propinsi',
			),
		array(
			'name'=>'city_id',
			'value'=>'MstCity::model()->findByPk($data->city_id)->nm_city',
			),
		/*
		'zip_code',
		'phone',
		'fax',
		'createdby',
		'createdtime',
		'updatedby',
		'updatedtime',
		
		*/
		array(
                'class'=>'bootstrap.widgets.TBButtonColumn',
               'template' => '{view}{update}{delete}',
               'buttons' => array(
               				'view' => array(
								'options'=>array(
								'class'=>'btn btn-small view'
								)
                            ),

               				'update' => array(
								'options'=>array(
								'class'=>'btn btn-small update'
								)
                            ),


                            'delete' => array(
                              'options'=>array(
                                   'class'=>'btn btn-small delete'
                                   ),
                            ),

               ),
            'htmlOptions'=>array('style'=>'width: 150px'),
           )
	),
)); ?>